<template>
  <div class="padding text-sm">
    <el-row :gutter="10" type="flex" class="flex-wrap">
      <el-col :lg="12" :md="24">
        <el-card class="margin-bottom">
          <div slot="header" class="clearfix relative">
            <span class="title-icon">港口信息</span>
            <el-button
              size="mini"
              type="info"
              class="header-cancel-btn"
              v-if="isChangeProtInfo"
              @click="isChangeProtInfo = false"
              >取消</el-button
            >
            <el-button
              type="success"
              size="mini"
              v-if="verifyShow.pickUpViewEdit"
              class="header-save-btn"
              @click="changeProtInfo"
            >
              {{ isChangeProtInfo ? "保存" : "编辑" }}
            </el-button>
          </div>
          <el-form size="mini" label-position="left" label-width="110px">
            <el-row class="row-customer-line" :gutter="10">
              <el-col :span="8">
                <!-- <span>目的国家:</span> -->
                <el-form-item prop="shipmentPort" label-width="70px">
                  <div slot="label">起运港:</div>

                  <el-select
                    v-if="isChangeProtInfo"
                    v-model="protInfo.shipmentPort"
                    placeholder="请选择起运港"
                    clearable
                    :style="{ width: '100%' }"
                    filterable
                  >
                    <el-option
                      v-for="(k, v) in configPortOptions"
                      :key="k"
                      :label="configPortOptions[v]"
                      :value="parseInt(v)"
                    ></el-option>
                  </el-select>

                  <span v-else>{{
                    configPortOptions[protInfo.shipmentPort]
                  }}</span>
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <!-- <span>目的国家:</span> -->
                <el-form-item prop="departurePortInspectionTime">
                  <div slot="label">起运港查验时间:</div>
                  <el-date-picker
                    v-if="isChangeProtInfo"
                    v-model="protInfo.departurePortInspectionTime"
                    type="date"
                    value-format="yyyy-MM-dd"
                    placeholder="选择日期"
                    :style="{ width: '100%' }"
                    :picker-options="pickerOptions"
                  >
                    >
                  </el-date-picker>

                  <span v-else>{{ protInfo.departurePortInspectionTime }}</span>
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <!-- <span>目的国家:</span> -->
                <el-form-item prop="departurePortInspectionReason">
                  <div slot="label">起运港查验原因:</div>

                  <el-input
                    v-if="isChangeProtInfo"
                    v-model="protInfo.departurePortInspectionReason"
                    clearable
                  />
                  <span v-else>{{
                    protInfo.departurePortInspectionReason
                  }}</span>
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <!-- <span>目的国家:</span> -->
                <el-form-item prop="destinationPort" label-width="70px">
                  <div slot="label">目的港:</div>
                  <el-select
                    v-if="isChangeProtInfo"
                    v-model="protInfo.destinationPort"
                    placeholder="请选择目的港"
                    clearable
                    :style="{ width: '100%' }"
                    filterable
                  >
                    <el-option
                      v-for="(k, v) in configPortOptions"
                      :key="k"
                      :label="configPortOptions[v]"
                      :value="parseInt(v)"
                    ></el-option>
                  </el-select>

                  <span v-else>{{
                    configPortOptions[protInfo.destinationPort]
                  }}</span>
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <!-- <span>目的国家:</span> -->
                <el-form-item prop="arrivalPortInspectionTime">
                  <div slot="label">目的港查验时间:</div>
                  <el-date-picker
                    v-if="isChangeProtInfo"
                    v-model="protInfo.arrivalPortInspectionTime"
                    type="date"
                    value-format="yyyy-MM-dd"
                    placeholder="选择日期"
                    :style="{ width: '100%' }"
                    :picker-options="pickerOptions"
                  >
                    >
                  </el-date-picker>

                  <span v-else>{{ protInfo.arrivalPortInspectionTime }}</span>
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <!-- <span>目的国家:</span> -->
                <el-form-item prop="arrivalPortInspectionReason">
                  <div slot="label">目的港查验原因:</div>

                  <el-input
                    v-if="isChangeProtInfo"
                    v-model="protInfo.arrivalPortInspectionReason"
                    clearable
                  />
                  <span v-else>{{ protInfo.arrivalPortInspectionReason }}</span>
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <!-- <span>目的国家:</span> -->
                <el-form-item prop="transferPort" label-width="70px">
                  <div slot="label">中转港:</div>
                  <el-select
                    v-if="isChangeProtInfo"
                    v-model="protInfo.transferPort"
                    placeholder="请选择目的港"
                    clearable
                    :style="{ width: '100%' }"
                    filterable
                  >
                    <el-option
                      v-for="(k, v) in configPortOptions"
                      :key="k"
                      :label="configPortOptions[v]"
                      :value="parseInt(v)"
                    ></el-option>
                  </el-select>

                  <span v-else>{{
                    configPortOptions[protInfo.transferPort]
                  }}</span>
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <!-- <span>目的国家:</span> -->
                <el-form-item prop="transferPortInspectionTime">
                  <div slot="label">中转港查验时间:</div>
                  <el-date-picker
                    v-if="isChangeProtInfo"
                    v-model="protInfo.transferPortInspectionTime"
                    type="date"
                    value-format="yyyy-MM-dd"
                    placeholder="选择日期"
                    :style="{ width: '100%' }"
                    :picker-options="pickerOptions"
                  >
                    >
                  </el-date-picker>

                  <span v-else>{{ protInfo.transferPortInspectionTime }}</span>
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <!-- <span>目的国家:</span> -->
                <el-form-item prop="transferPortInspectionReason">
                  <div slot="label">中转港查验原因:</div>

                  <el-input
                    v-if="isChangeProtInfo"
                    v-model="protInfo.transferPortInspectionReason"
                    clearable
                  />
                  <span v-else>{{
                    protInfo.transferPortInspectionReason
                  }}</span>
                </el-form-item>
              </el-col>
            </el-row>
          </el-form>
        </el-card>
      </el-col>

      <el-col
        :lg="12"
        :md="24"
        v-if="
          (!verifyShow.saler && !verifyShow.saleAssistant) ||
            verifyShow.superAdmin
        "
      >
        <el-card class="margin-bottom">
          <div slot="header" class="clearfix relative">
            <span class="title-icon"> 订舱服务商信息</span>
            <el-button
              size="mini"
              type="info"
              class="header-cancel-btn"
              v-if="isChangeServiceInfo"
              @click="isChangeServiceInfo = false"
              >取消</el-button
            >
            <el-button
              type="success"
              size="mini"
              v-if="verifyShow.pickUpViewEdit"
              class="header-save-btn"
              @click="changeServiceInfo"
            >
              {{ isChangeServiceInfo ? "保存" : "编辑" }}
            </el-button>
          </div>
          <el-form
            size="mini"
            label-position="left"
            label-width="108px"
            style="height:125px;"
          >
            <el-row :gutter="5">
              <el-col :span="16">
                <el-row :gutter="5" v-if="pageType != 'seaFreight'">
                  <el-col :span="12">
                    <el-form-item prop="shipOrAirlineCompany">
                      <div slot="label">航空公司:</div>
                      <el-select
                        v-if="isChangeServiceInfo"
                        v-model="serviceInfo.shipOrAirlineCompany"
                        placeholder="请选择航空公司"
                        clearable
                        :style="{ width: '100%' }"
                        filterable
                      >
                        <el-option
                          v-for="(k, v) in airlineOptions"
                          :key="k"
                          :label="airlineOptions[v]"
                          :value="parseInt(v)"
                        ></el-option>
                      </el-select>

                      <span v-else @click="gotoNetAddress">{{
                        airlineOptions[serviceInfo.shipOrAirlineCompany]
                      }}</span>
                    </el-form-item>
                  </el-col>
                  <el-col :span="12">
                    <el-form-item prop="flightNumber">
                      <div slot="label">航班号:</div>

                      <el-input
                        v-if="isChangeServiceInfo"
                        v-model="serviceInfo.flightNumber"
                        clearable
                      />
                      <span v-else>{{ serviceInfo.flightNumber }}</span>
                    </el-form-item>
                  </el-col>
                </el-row>

                <el-row :gutter="5" v-if="pageType == 'seaFreight'">
                  <el-col :span="12">
                    <el-form-item prop="shipOrAirlineCompany">
                      <div slot="label">船公司:</div>
                      <el-select
                        v-if="isChangeServiceInfo"
                        v-model="serviceInfo.shipOrAirlineCompany"
                        placeholder="请选择船公司"
                        clearable
                        :style="{ width: '100%' }"
                        filterable
                      >
                        <el-option
                          v-for="(k, v) in shipMap"
                          :key="k"
                          :label="shipMap[v]"
                          :value="parseInt(v)"
                        ></el-option>
                      </el-select>

                      <span v-else @click="gotoNetAddress">{{
                        shipMap[serviceInfo.shipOrAirlineCompany]
                      }}</span>
                    </el-form-item>
                  </el-col>
                  <el-col :span="12">
                    <el-form-item prop="bigShip">
                      <div slot="label">大船船只:</div>

                      <el-input
                        v-if="isChangeServiceInfo"
                        v-model="serviceInfo.bigShip"
                        clearable
                      />
                      <span v-else>{{ serviceInfo.bigShip }}</span>
                    </el-form-item>
                  </el-col>
                </el-row>

                <el-row :gutter="5" v-if="pageType == 'seaFreight'">
                  <el-col :span="12">
                    <el-form-item prop="shipFlights">
                      <div slot="label">大船航次:</div>

                      <el-input
                        v-if="isChangeServiceInfo"
                        v-model="serviceInfo.shipFlights"
                        clearable
                      />
                      <span v-else>{{ serviceInfo.shipFlights }}</span>
                    </el-form-item>
                  </el-col>
                  <el-col :span="12">
                    <el-form-item prop="shipImo">
                      <div slot="label">船只IMO:</div>

                      <el-input
                        v-if="isChangeServiceInfo"
                        v-model="serviceInfo.shipImo"
                        clearable
                      />
                      <span v-else>{{ serviceInfo.shipImo }}</span>
                    </el-form-item>
                  </el-col>
                  <el-col :span="12">
                    <el-form-item prop="seaTrayNumber">
                      <div slot="label">托盘数:</div>

                      <el-input
                        v-if="isChangeServiceInfo"
                        v-model="serviceInfo.seaTrayNumber"
                        clearable
                        @keyup.native="proving"
                      />
                      <span v-else v-html="serviceInfo.seaTrayNumber"></span>
                    </el-form-item>
                  </el-col>
                  <el-col :span="12">
                    <el-form-item prop="disContainerNo">
                      <div slot="label">拆托号:</div>

                      <el-input
                        v-if="isChangeServiceInfo"
                        v-model="serviceInfo.disContainerNo"
                        clearable
                      />
                      <span v-else v-html="serviceInfo.disContainerNo"></span>
                    </el-form-item>
                  </el-col>
                </el-row>

                <el-row :gutter="5">
                  <el-col :span="12">
                    <el-form-item prop="serviceCompanyId">
                      <div slot="label">订舱服务商:</div>
                      <el-select
                        v-if="isChangeServiceInfo"
                        v-model="serviceInfo.serviceCompanyId"
                        placeholder="请选择订舱服务商"
                        clearable
                        :style="{ width: '100%' }"
                        filterable
                      >
                        <el-option
                          v-for="(k, v) in serviceCompanyOptions"
                          :key="k"
                          :label="serviceCompanyOptions[v]"
                          :value="parseInt(v)"
                        ></el-option>
                      </el-select>

                      <span v-else>{{
                        serviceCompanyOptions[serviceInfo.serviceCompanyId]
                      }}</span>
                    </el-form-item>
                  </el-col>
                  <el-col :span="12">
                    <el-form-item prop="customsClearanceAgent">
                      <div slot="label">清关服务商:</div>
                      <el-select
                        v-if="isChangeServiceInfo"
                        v-model="serviceInfo.customsClearanceAgent"
                        placeholder="请选择清关服务商"
                        @change="sysncToMorder"
                        clearable
                        :style="{ width: '100%' }"
                        filterable
                      >
                        <el-option
                          v-for="(k, v) in serviceCompanyOptions"
                          :key="k"
                          :label="serviceCompanyOptions[v]"
                          :value="parseInt(v)"
                        ></el-option>
                      </el-select>

                      <span v-else>{{
                        serviceCompanyOptions[serviceInfo.customsClearanceAgent]
                      }}</span>
                    </el-form-item>
                  </el-col>
                </el-row>
              </el-col>
              <el-col :md="12" :lg="8">
                <el-form-item prop="afterSendServicer">
                  <div slot="label">派送服务商:</div>
                  <el-select
                    v-if="isChangeServiceInfo"
                    v-model="serviceInfo.afterSendServicer"
                    placeholder="请选择派送服务商"
                    clearable
                    :style="{ width: '100%' }"
                    filterable
                  >
                    <el-option
                      v-for="(k, v) in serviceCompanyOptions"
                      :key="v"
                      :label="serviceCompanyOptions[v]"
                      :value="parseInt(v)"
                    ></el-option>
                  </el-select>

                  <span v-else>{{
                    serviceCompanyOptions[serviceInfo.afterSendServicer]
                  }}</span>
                </el-form-item>
              </el-col>

              <el-col :md="12" :lg="8" v-if="pageType == 'seaFreight'">
                <el-form-item prop="deliveryType">
                  <div slot="label">派送方式:</div>
                  <el-select
                    v-if="isChangeServiceInfo"
                    v-model="serviceInfo.deliveryType"
                    placeholder="请选择派送方式"
                    clearable
                    :style="{ width: '100%' }"
                    filterable
                  >
                    <el-option
                      v-for="(k, v) in deliveryTypeOptions"
                      :key="k"
                      :label="k"
                      :value="parseInt(v)"
                    ></el-option>
                  </el-select>

                  <span v-else>{{
                    deliveryTypeOptions[serviceInfo.deliveryType]
                  }}</span>
                </el-form-item>
              </el-col>

              <el-col :span="8" v-if="pageType != 'seaFreight'">
                <el-form-item prop="portOfDestinationWay">
                  <div slot="label">目的港提货方式:</div>

                  <el-input
                    v-if="isChangeServiceInfo"
                    v-model="serviceInfo.portOfDestinationWay"
                    clearable
                  />
                  <span v-else>{{ serviceInfo.portOfDestinationWay }}</span>
                </el-form-item>
              </el-col>

              <el-col :span="8" v-if="pageType != 'seaFreight'">
                <el-form-item prop="boardNo">
                  <div slot="label">板号:</div>

                  <el-input
                    v-if="isChangeServiceInfo"
                    v-model="serviceInfo.boardNo"
                    clearable
                  />
                  <span v-else>{{ serviceInfo.boardNo }}</span>
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item prop="dutyNo">
                  <div slot="label">Entry No:</div>

                  <el-input
                    v-if="isChangeServiceInfo"
                    v-model="serviceInfo.dutyNo"
                    clearable
                  />
                  <span v-else>{{ serviceInfo.dutyNo }}</span>
                </el-form-item>
              </el-col>

              <el-col :span="8">
                <el-form-item prop="estimatedDepartureTime">
                  <div slot="label">预计离港时间:</div>

                  <el-date-picker
                    v-if="isChangeServiceInfo"
                    value-format="yyyy-MM-dd HH:mm:ss"
                    v-model="serviceInfo.estimatedDepartureTime"
                    type="date"
                    placeholder="选择日期"
                    :style="{ width: '100%' }"
                    :picker-options="pickerOptions"
                  >
                    >
                  </el-date-picker>
                  <span v-else>{{ serviceInfo.estimatedDepartureTime }}</span>
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item prop="operationRemark">
                  <div slot="label">操作备注:</div>

                  <el-input
                    v-if="isChangeServiceInfo"
                    type="textarea"
                    v-model="serviceInfo.operationRemark"
                    clearable
                  />
                  <span v-else v-html="serviceInfo.operationRemark"></span>
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item prop="isInsure">
                  <div slot="label">是否已投保:</div>
                  <el-select
                    v-model="serviceInfo.isInsure"
                    filterable
                    placeholder="请选择"
                    v-if="isChangeServiceInfo"
                  >
                    <el-option label="是" value="1"></el-option>
                    <el-option label="否" value="0"></el-option>
                  </el-select>
                  <span v-else>
                    <template v-if="serviceInfo.isInsure == 1">
                      是
                    </template>
                    <template v-else>
                      否
                    </template>
                  </span>
                </el-form-item>
              </el-col>
            </el-row>
          </el-form>
        </el-card>
      </el-col>
    </el-row>
    <!-- v-if="(!verifyShow.saler && !verifyShow.saleAssistant) || verifyShow.superAdmin"-->
    <MasterOrder
      v-if="verifyShow.waybillMInfo || verifyShow.superAdmin"
      :pageType="pageType"
      :waybillData="waybillData"
    ></MasterOrder>
    <HouseOrder
      v-if="
        (!verifyShow.saler && !verifyShow.saleAssistant) ||
          verifyShow.superAdmin
      "
      :pageType="pageType"
      :waybillData="waybillData"
    ></HouseOrder>
  </div>
</template>

<script>
import { ajax } from "@/store/yg/common/utils";
import axios from "axios";
import * as constant from "@/store/yg/common/constant";
import MasterOrder from "../../waybillmerge/components/MasterOrder";
import HouseOrder from "../../waybillmerge/components/HouseOrder";

export default {
  components: {
    HouseOrder,
    MasterOrder
  },
  props: {
    verifyShow: {
      type: Object,
      default: function() {
        return {};
      }
    },
    Constatvariable: {
      type: Object,
      default: function() {
        return {};
      }
    },
    pageType: {
      type: String,
      default: ""
    }
  },
  data() {
    return {
      pickerOptions: {
        // disabledDate(time) {
        //   return time.getTime() > Date.now();
        // },
        shortcuts: [
          {
            text: "今天",
            onClick(picker) {
              picker.$emit("pick", new Date());
            }
          },
          {
            text: "昨天",
            onClick(picker) {
              const date = new Date();
              date.setTime(date.getTime() - 3600 * 1000 * 24);
              picker.$emit("pick", date);
            }
          },
          {
            text: "一周前",
            onClick(picker) {
              const date = new Date();
              date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
              picker.$emit("pick", date);
            }
          }
        ]
      },
      deliveryTypeOptions: { 0: "整柜直送", 1: "拆柜派送" },
      waybillData: this.Constatvariable,
      isChangeProtInfo: false,
      isChangeServiceInfo: false,
      isChangeMInfo: false,
      isChangeHInfo: false,
      protInfo: {
        id: 0,
        waybillId: 0,
        shipmentPort: 1, // 起运港：
        destinationPort: 1, // 目的港：
        transferPort: 1, // 中转港：
        estimatedDepartureTime: 1, // 预计离港时间：
        departurePortInspectionTime: "", // 起运港查验时间：
        arrivalPortInspectionTime: "", // 目的港查验时间：
        transferPortInspectionTime: "", // 中转港查验时间：
        estimatedArrivalTime: "", // 预计到港时间：
        departurePortInspectionReason: 1, // 起运港查验原因：
        arrivalPortInspectionReason: 1, // 目的港查验原因：
        transferPortInspectionReason: 1 // 中转港查验原因：
      },
      serviceInfo: {
        id: 0,
        waybillId: 0,
        shipOrAirlineCompany: 1, // 航空公司：
        serviceCompanyId: 1, // 服务商：
        flightNumber: 1, // 航班号：
        customsClearanceAgent: 1, // 清关服务商：
        innerRemark: 1, // 操作备注：
        isInsure: 0,
        seaTrayNumber: "",
        disContainerNo: ""
      },
      MInfo: {
        id: 0,
        waybillId: 0,
        masterNumber: 1, // M单号：
        masterNumberSender: 1, // M单号：发件人
        masterNumberReceiver: 1, // M单号：收件人
        masterNumberNotifier: 1, // M单号：通知人
        masterNumberAgent: 1, // M单号：代理
        serachSender: "",
        serachReceiver: "",
        serachNotifier: "",
        serachAgent: ""
      },
      HInfo: {
        id: 0,
        waybillId: 0,
        houseNumber: 1, // H单号：
        houseNumberSender: 1, // H单号：发件人
        houseNumberReceiver: 1, // H单号：收件人
        houseNumberNotifier: 1, // H单号：通知人
        houseNumberAgent: 1, // H单号：代理
        serachSender: "",
        serachReceiver: "",
        serachNotifier: "",
        serachAgent: ""
      },
      //港口下拉
      configPortOptions: {},
      //航空公司下拉
      airlineOptions: {},
      shipMap: {},
      //服务商
      serviceCompanyOptions: {},
      restaurants: [],
      state4: "",
      timeout: null
    };
  },
  methods: {
    gotoNetAddress() {
      var netAddress = this.waybillData["netAddress"];
      console.log(netAddress);
      if (netAddress && netAddress != "") {
        var a = document.createElement("a");
        a.setAttribute("href", netAddress);
        a.setAttribute("target", "_blank");
        a.click();
      }
    },

    sysncToMorder() {},

    initData() {
      var param = {};
      const waybillId = this.$route.query.waybillId;
      param["id"] = waybillId;
      ajax("initDataPickUpData", param).then(
        res => {
          if (res.code != 200) {
            this.$message.error(res.message);
          } else {
            if (null != res.data) {
              this.protInfo = res.data;
              this.serviceInfo = res.data;
              this.MInfo = res.data;
              this.HInfo = res.data;
            }
          }
          this.getProtOptions();
        },
        error => {
          console.log(error);
        }
      );
    },

    getProtOptions() {
      ajax("getProtOptions", {}).then(
        res => {
          if (res.code != 200) {
            this.$message.error(res.message);
          } else {
            if (null != res.data) {
              this.restaurants = res.data["companyMap"];
              if (
                this.protInfo.shippingWay == "ZX" ||
                this.protInfo.shippingWay == "AIR"
              ) {
                this.configPortOptions = res.data["airPortMap"];
              } else {
                this.configPortOptions = res.data["configPortMap"];
              }

              this.airlineOptions = res.data["airlineMap"];
              this.shipMap = res.data["shipMap"];
              this.serviceCompanyOptions = res.data["serviceCompanyMap"];
            }
          }
        },
        error => {
          console.log(error);
        }
      );
    },

    changeProtInfo() {
      if (this.isChangeProtInfo) {
        this.isChangeProtInfo = false;
        var param = this.protInfo;
        ajax("changeProtInfo", param).then(
          res => {
            if (res.code != 200) {
              if (null != res.message) {
                this.$message.error(m(res.message));
              } else {
                this.$message.error("修改失败!");
              }
            } else {
              this.$message.success("修改成功!");
            }
          },
          error => {
            console.log(error);
          }
        );
      } else {
        this.isChangeProtInfo = true;
      }
    },
    proving() {
      this.serviceInfo.seaTrayNumber = this.serviceInfo.seaTrayNumber.replace(
        /[^\.\d]/g,
        ""
      );
      this.serviceInfo.seaTrayNumber = this.serviceInfo.seaTrayNumber.replace(
        "",
        ""
      );
    },
    changeServiceInfo() {
      if (this.isChangeServiceInfo) {
        this.isChangeServiceInfo = false;
        var param = this.serviceInfo;
        ajax("changeServiceInfo", param).then(
          res => {
            if (res.code != 200) {
              if (null != res.message) {
                this.$message.error(m(res.message));
              } else {
                this.$message.error("修改失败!");
              }
            } else {
              this.$message.success("修改成功!");
              if (
                (null != param["customsClearanceAgent"] &&
                  param["customsClearanceAgent"] != "") ||
                (null != param["serviceCompanyId"] &&
                  param["serviceCompanyId"] != "")
              ) {
                var parmValue = param["customsClearanceAgent"];
                ajax("queryServiceCompanyById", { id: parmValue }).then(
                  res => {
                    if (res.code != 200) {
                      this.$message.error(res.message);
                    } else {
                      if (null != res.data) {
                        const html =
                          res.data["companyNameEn"] +
                          "\n" +
                          res.data["companyAddressEn"] +
                          "\n" +
                          "TEL:" +
                          res.data["firstContactPhone"] +
                          "\n" +
                          res.data["vatNumber"];
                        this.Constatvariable["masterNumberReceiver"] = html;
                        this.Constatvariable["serachReceiver"] = parmValue;
                        this.Constatvariable["masterNumberAgent"] = html;
                        this.Constatvariable["serachAgent"] = parmValue;
                      }
                    }
                  },
                  error => {
                    console.log(error);
                  }
                );
              }
            }
          },
          error => {
            console.log(error);
          }
        );
      } else {
        this.isChangeServiceInfo = true;
      }
    }
    // cleanAgentFilter(value) {
    //   alert(value);
    // }
  },
  mounted() {
    this.initData();
  }
};
</script>

<style></style>
